package cn.wink.springcloud.service;

import cn.wink.springcloud.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * @author xw
 * @date 2020-05-16 23:26
 */
@FeignClient(value = "CLOUD-PAYMENT-HYSTRIX-SERVICE"/*,fallback = PaymentFallBackService.class*/)
public interface PaymentFeignService {

    @GetMapping("/payment/get/{id}")
    Result<Map<String, Object>> getOne(@PathVariable("id") Long id);

    @GetMapping("/payment/get/timeOut/{id}")
    Result<Map<String,Object>> getByIdTimeOut(@PathVariable("id") Long id);

    @GetMapping("/payment/circuit/{id}")
    Result paymentCircuitBreaker(@PathVariable("id") Long id);
}
